using UnityEngine;
using System.Collections;

public class Tile : MonoBehaviour 
{
	public Texture texture;
	public Vector2 frames = new Vector2();
	public Vector2 currentFrame = new Vector2();
	public bool isWalkable = true;
	
	Sprite sprite;
	
	void Awake()
	{
		renderer.material.SetTexture("_MainTex",texture);
		sprite = new Sprite(this.transform, frames, currentFrame);
	}
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		sprite.setFrame(currentFrame);
	}
}
